var photo = {
    vueInfo: null,
    URL: {

        loadImgListUrl: "/api/userInfo/loadImgList",
    },
    detail: {
        loadImgList: function () {
            $.post(photo.URL.loadImgListUrl, {}, function (data) {
                if (!data.hasError) {
                    photo.vueInfo = new Vue({
                        el: "#all",
                        data: {
                            imgUrl: "http://img.si0086.com/",
                            imgList: data.rows,
                        },
                        mounted: function () {
                            winInit();
                            $.pop.load(false, null);
                        },
                        methods: {
                            show: function (item) {
                                var vmObj = this;
                                photo.detail.showImgs(vmObj,item);
                            }
                        },
                    });
                } else {
                    if (data.errType != null) {
                        $.pop.tips(data.error);
                        if (data.errType == "NOSESSION") {
                            setTimeout(function () {
                                window.location.href = data.errUrl;
                                return false;
                            }, 400);
                        }
                    }
                }
            }, "json").error(function (XMLHttpRequest, textStatus, errorThrown) {
                $.pop.load(false, null);
                $.pop.tips("系统繁忙，请稍后" + XMLHttpRequest.status + "," + XMLHttpRequest.readyState + "," + textStatus);
            });
        },
        showImgs:function (vmObj,item) {
            var url = vmObj.imgUrl + item.url;
            var arr = Array();
            for(var i = 0; i< vmObj.imgList.length; i++){
                var obj = vmObj.imgList[i];
                arr.push(vmObj.imgUrl + obj.url);
            }
            wx.previewImage({
                current: url,
                urls: arr //这里就将[]去掉
            });
        }
    }
}